#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int k = 1, i, n, t;
		float e = 1, s = 1;
	scanf("%d", &n);
	do
	{
		t = 1;
		for (i = 2; i <= k; i++)
			t = t * i;
		e = e + 1.0 / t;
		k++;
	} while (k <= n);
	printf("%.2f", e);
	return 0;
}